﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace ModelLayer
{
    [DataContract]
    public class ShoppingList
    {
        //Values
        [DataMember]
        public int ShoppingListId { get; set; }
        [DataMember]
        public string ShoppingListName { get; set; }
        [DataMember]
        public long CreationDate { get; set; }
        [DataMember]
        public long CompletionDate { get; set; }

        //Lists
        public List<User> Users { get; set; }
        //public List<Product> products { get; set; }


        public ShoppingList(string shoppingListName, long creationDate, long completionDate)
        {
            this.ShoppingListName = shoppingListName;
            this.CreationDate = creationDate;
            this.CompletionDate = completionDate;

            this.Users = new List<User>();
        }

        public ShoppingList(int id, string shoppingListName, long creationDate, long completionDate)
        {
            this.ShoppingListId = id;
            this.ShoppingListName = shoppingListName;
            this.CreationDate = creationDate;
            this.CompletionDate = completionDate;

            this.Users = new List<User>();
        }

        public ShoppingList()
        {

            this.Users = new List<User>();
        }

        public override string ToString()
        {
            return ShoppingListName;
        }
    }
}
